package com.itheima.file;

import java.io.File;

public class Demo {
    public static void main(String[] args) {
        File f=new File("D:\\itcast\\a.java");

        String name = f.getName();
        System.out.println(name);

        String[]   split = name.split("\\.");
        System.out.println(split.length);
        if (split[1].equals("java")){
            System.out.println(name);

        }    }
}
